import request from '@/utils/request';
import { other } from './prefix';

const videoManage = {
  // 查询视频艺术品列表
  getVideoType(params) {
    return request.get(other + '/famous_video', { params });
  },
  // 查询视频审核列表
  getVideoAudit(params) {
    return request.get(other + '/art_video', { params });
  },

  // 视频审核
  updVideoAudit(id, params) {
    return request.post(other + '/art_video/' + id, params);
  },
  // 查询推荐视频艺术品列表
  getRecommentVideoType(params) {
    return request.get(other + '/famous_video_recomment', { params });
  },
  // 创建视频艺术品
  setVideoType(params) {
    return request.post(other + '/famous_video', params);
  },
  // 更新视频艺术品
  updVideoType(id, params) {
    return request.post(other + '/famous_video/' + id, params);
  },
  // 删除视频艺术品
  delVideoType(id) {
    return request.delete(other + '/famous_video/' + id);
  },
  // 上传视频艺术品图片
  setVideoTypeImage(id, params) {
    return request.post(other + '/famous_video/' + id + '?op=upload_file&name=video_page', params);
  },
  // 上传视频
  uploadVideo(id, params) {
    return request.post(other + '/famous_video/' + id + '?op=upload_file&name=video_path', params);
  },
};

export default videoManage;
